﻿using AutoMapper;
using BasicData.Domain;
using BasicData.Write.API.application.Command.Permission;
using BasicData.Write.API.application.Command.Role;
using BasicData.Write.API.application.Command.User;

namespace BasicData.Write.API
{
    public class MyAuto:Profile
    {
        public MyAuto()
        {
            CreateMap<UserModel, UserCreateCommand>().ReverseMap();
            CreateMap<UserModel, UserUpdateCommand>().ReverseMap();
            CreateMap<RoleModel, AddRoleCreateCommand>().ReverseMap();
            CreateMap<RoleModel, UpdateRoleCommand>().ReverseMap();
            CreateMap<PermissionModel, AddCreatePermissionCommand>().ReverseMap();
            CreateMap<PermissionModel, UpdatePermissionCommand>().ReverseMap();
        }
    }
}
